home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Cream of the Crop 1
/
Cream of the Crop 1.iso
/
UTILITY
/
JSEARCH.ARJ
/
JSEARCH.DOC
next >
Wrap
Text File
|
1992-02-02
|
4KB
|
128 lines
*** A free string search program from Josh Greenberger ***
*** This program may be freely distributed ***
JSEARCH Documentation
--------------------
Assume you have the following files on disk:
FILE1.TXT containing ...
---------
They fight like cats and dogs.
But the cat always wins.
And the dog never wins.
FILE2.TXT containing ...
---------
Crawls like a caterpillar.
Slow as a snail.
FILE3.TXT containing ...
---------
It's a dog eat dog world.
But not if you're a big dog.
Input Files
-----------
JSEARCH requires that you create a file called JSEARCH.INP with a
list of all the files you want to search through. (You can do this
with an editor or word processor. Or, for long lists, you can
create JSEARCH.INP with the DIR command with redirection.) So,
file JSEARCH.INP, in this case, will contain ...
FILE1.TXT
FILE2.TXT
FILE3.TXT
In the following example 'PROMPT>' indicates the program's prompt.
'RESP>' indicates your response. Anything in square brackets is
explanation for documentation purposes. <cr> means hit carriage
return.
After creating input file JSEARCH.INP, start the search by entering
...
JSEARCH<cr>
PROMPT>Search for EXACT matches? (E) Or ignore case? (<cr>) ...
[You may enter an 'E' if you want a case-sensitive search, or
carriage return if you want the case ignored. For now, we just hit
<cr>.]
PROMPT>Enter search string 1 (80 character max / <cr> to end) ...
RESP>cat
PROMPT> ... Is the above string a WORD? (W)
Or an embedded string? (<cr>) ... RESP>w
[If you want 'cat' found only if it's a separate word, enter 'W'.
If you don't care if it's part of another word, hit <cr>.]
PROMPT>Enter search string 2 (80 character max / <cr> to end) ...
RESP>dog
PROMPT> ... Is the above string a WORD? (W)
Or an embedded string? (<cr>) ... RESP> <cr>
PROMPT>Enter search string 3 (80 character max / <cr> to end) ...
[As long as you keep entering search strings you will continue to
be prompted for more, up to 100 times. Hitting <cr> without
entering a string will move you on to the next step. In this case,
we hit <cr>.]
PROMPT>AND search strings? (A) Or OR search strings? (<cr>) ...
RESP> <cr>
[If you want to find only lines that contain all your search
strings on the same line, enter 'A'. If you want to find any line
that contains any one of your search strings, enter <cr>.]
PROMPT>Do not search lines beginning with ... RESP>but <cr>
[The search will not be performed on lines that begin with the
string entered here. <cr> without a string will cause all lines to
be searched. In this case, we don't want to search lines beginning
with 'but'.]
The search begins, and you will see the following on the screen:
--- FILE: FILE1.TXT
--- FILE: FILE2.TXT
--- FILE: FILE3.TXT
- EOJ -
The results of the search are contained in a file called
JSEARCH.OUT. For this example, JSEARCH.OUT will look like this:
* String search, ignoring case.
* Ignored lines beginning with ...
->BUT<-
The following strings have been ORed :
--------------------------------------
W ->CAT<-
->DOG<-
--------------------------------------
--- FILE: FILE1.TXT
1>They fight like cats and dogs.
3>And the dog never wins.
--- FILE: FILE2.TXT
--- FILE: FILE3.TXT
1>It's a dog eat dog world.
- EOJ -